Optimal. Leaf size=46 \[ \frac {\sec ^4(x)}{4 a}+\frac {\tanh ^{-1}(\sin (x))}{8 a}-\frac {\tan (x) \sec ^3(x)}{4 a}+\frac {\tan (x) \sec (x)}{8 a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.13, antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.538, Rules used = {3872, 2835, 2606, 30, 2611, 3768, 3770} \[ \frac {\sec ^4(x)}{4 a}+\frac {\tanh ^{-1}(\sin (x))}{8 a}-\frac {\tan (x) \sec ^3(x)}{4 a}+\frac {\tan (x) \sec (x)}{8 a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2606
Rule 2611
Rule 2835
Rule 3768
Rule 3770
Rule 3872
Rubi steps
\begin {align*} \int \frac {\sec ^3(x)}{a+a \csc (x)} \, dx &=\int \frac {\sec ^2(x) \tan (x)}{a+a \sin (x)} \, dx\\ &=\frac {\int \sec ^4(x) \tan (x) \, dx}{a}-\frac {\int \sec ^3(x) \tan ^2(x) \, dx}{a}\\ &=-\frac {\sec ^3(x) \tan (x)}{4 a}+\frac {\int \sec ^3(x) \, dx}{4 a}+\frac {\operatorname {Subst}\left (\int x^3 \, dx,x,\sec (x)\right )}{a}\\ &=\frac {\sec ^4(x)}{4 a}+\frac {\sec (x) \tan (x)}{8 a}-\frac {\sec ^3(x) \tan (x)}{4 a}+\frac {\int \sec (x) \, dx}{8 a}\\ &=\frac {\tanh ^{-1}(\sin (x))}{8 a}+\frac {\sec ^4(x)}{4 a}+\frac {\sec (x) \tan (x)}{8 a}-\frac {\sec ^3(x) \tan (x)}{4 a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 25, normalized size = 0.54 \[ \frac {\frac {1}{1-\sin (x)}+\frac {1}{(\sin (x)+1)^2}+\tanh ^{-1}(\sin (x))}{8 a} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.60, size = 70, normalized size = 1.52 \[ -\frac {2 \, \cos \relax (x)^{2} - {\left (\cos \relax (x)^{2} \sin \relax (x) + \cos \relax (x)^{2}\right )} \log \left (\sin \relax (x) + 1\right ) + {\left (\cos \relax (x)^{2} \sin \relax (x) + \cos \relax (x)^{2}\right )} \log \left (-\sin \relax (x) + 1\right ) - 2 \, \sin \relax (x) - 6}{16 \, {\left (a \cos \relax (x)^{2} \sin \relax (x) + a \cos \relax (x)^{2}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.57, size = 48, normalized size = 1.04 \[ \frac {\log \left (\sin \relax (x) + 1\right )}{16 \, a} - \frac {\log \left (-\sin \relax (x) + 1\right )}{16 \, a} - \frac {\sin \relax (x)^{2} + \sin \relax (x) + 2}{8 \, a {\left (\sin \relax (x) + 1\right )}^{2} {\left (\sin \relax (x) - 1\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.52, size = 44, normalized size = 0.96 \[ -\frac {1}{8 a \left (-1+\sin \relax (x )\right )}-\frac {\ln \left (-1+\sin \relax (x )\right )}{16 a}+\frac {1}{8 a \left (1+\sin \relax (x )\right )^{2}}+\frac {\ln \left (1+\sin \relax (x )\right )}{16 a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.38, size = 54, normalized size = 1.17 \[ -\frac {\sin \relax (x)^{2} + \sin \relax (x) + 2}{8 \, {\left (a \sin \relax (x)^{3} + a \sin \relax (x)^{2} - a \sin \relax (x) - a\right )}} + \frac {\log \left (\sin \relax (x) + 1\right )}{16 \, a} - \frac {\log \left (\sin \relax (x) - 1\right )}{16 \, a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.22, size = 44, normalized size = 0.96 \[ \frac {\mathrm {atanh}\left (\sin \relax (x)\right )}{8\,a}+\frac {\frac {{\sin \relax (x)}^2}{8}+\frac {\sin \relax (x)}{8}+\frac {1}{4}}{-a\,{\sin \relax (x)}^3-a\,{\sin \relax (x)}^2+a\,\sin \relax (x)+a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\sec ^{3}{\relax (x )}}{\csc {\relax (x )} + 1}\, dx}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________